-- GENERATED SPELL FOR [Kil'sorrow Cultist] --


function spell0_17147(pUnit, Event) --@Mind Sear,n/a--
pUnit:FullCastSpellOnTarget(32000,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17147', 3000, 1)
end

function spell1_17147(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(16592,pUnit)
pUnit:RegisterEvent('Sorts_17147', 649, 1)
end

function Sorts_17147(pUnit, Event)
local choix_sorts_17147 = math.random(0, 1)
if choix_sorts_17147 == 0 then
pUnit:RegisterEvent('spell0_17147', 1, 1)
end
if choix_sorts_17147 == 1 then
pUnit:RegisterEvent('spell1_17147', 1, 1)
end
end

function mob17147_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17147', math.random(1500, 3000), 1)
end

function mob17147_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17147_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17147_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17147, 1, 'mob17147_Action')
RegisterUnitEvent(17147, 2, 'mob17147_Leave')
RegisterUnitEvent(17147, 3, 'mob17147_Kill')
RegisterUnitEvent(17147, 4, 'mob17147_Die')
